package com.mhc.haval.exception;

import com.mhc.haval.constant.MsgCodeEnum;
import lombok.Data;

/**
 * Created by kanon on 17/9/27 15:25.
 */
@Data
public class HavalCommonException extends RuntimeException {

    protected String code;


    public HavalCommonException() {
        super();
    }

    public HavalCommonException(String message) {
        super(message);
    }

    public HavalCommonException(Throwable cause) {
        super(cause);
    }

    public HavalCommonException(MsgCodeEnum errorCodeEnum) {
        super(errorCodeEnum.getErrMsg());
        this.code = errorCodeEnum.getErrCode();
    }

    public HavalCommonException(String message, Throwable cause) {
        super(message, cause);
    }

}

